package com.quartz.demo4;

import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.time.LocalDateTime;
import java.util.ResourceBundle;

public class MyJob4 implements Job{


	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		JobDataMap dataMap = context.getJobDetail().getJobDataMap();
		long l = System.currentTimeMillis();
		System.out.println(this.getClass().toString()+" start ... input:"+dataMap.toString());
		String data1 = (String) dataMap.get("data1");
		String[] keys = dataMap.getKeys();
		int length = keys.length;
		for (int i = 0; i < length ; i++) {
			System.out.println(keys[i]+":"+dataMap.get(keys[i]));
		}
		long l1 = System.currentTimeMillis();
		System.out.println(this.getClass().toString()+"end.."+dataMap.toString());
	}
}
